<template>
  <div class="m-back" @click="backTop">
    <i class="iconfont"> &#xe60a; </i>
  </div>
</template>

<script>
export default {
  setup() {
      const backTop = ()=>{
          document.body.scrollTop = document.documentElement.scrollTop = 0;
      }
    return {
        backTop
    };
  },
};
</script>
<style scoped>
.m-back {
  background-color: #00bcd4;
  border-radius: 50%;
  color: #fff;
  height: 44px;
  text-align: center;
  width: 44px;
  position: fixed;
  bottom: 60px;
  right: 10px;
  z-index: 99999;
  display: flex;
  justify-content: center;
  align-items: center;
}
.m-back .iconfont{
    font-size: 24px;
} 
</style>
